Skip to content

Conversation

@akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Apr 14, 2023

This got broken by #83903 and wasn't noticed on the PR because we don't build .frameworks unless you pass /p:BuildDarwinFrameworks=true.

For .frameworks we need to use a different install command and we also don't need to codesign them, it actually causes an error trying to do so (only on Catalyst though, not on iOS/tvOS for some reason):

/Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release: code object is not signed at all
In subcomponent: /Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release.dwarf

/cc @am11

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 14, 2023
@ghost ghost assigned akoeplinger Apr 14, 2023
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this since it was confusing to have the "Stripping" message printed after we're done stripping

@akoeplinger akoeplinger requested a review from steveisok April 14, 2023 20:06
This got broken by dotnet#83903 and wasn't noticed on the PR because we don't build .frameworks unless you pass `/p:BuildDarwinFrameworks=true`.

For .frameworks we need to use a different install command and we also don't need to codesign them, it actually causes an error trying to do so:

> /Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release: code object is not signed at all
> In subcomponent: /Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release.dwarf
string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_CMAKE_BUILD_TYPE)
if (LOWERCASE_CMAKE_BUILD_TYPE STREQUAL release)
set(strip_command ${strip_command} && codesign -f -s - ${strip_source_file})
if (CLR_CMAKE_TARGET_OSX)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps just:

Suggested change
if (CLR_CMAKE_TARGET_OSX)
if (NOT CLR_CMAKE_TARGET_MACCATALYST)

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only other targets are iOS/tvOS and it doesn't make much sense to codesign there either since that will be done during the app build. we've also not done this in the mono.proj version before you change so I think it's fine to limit it to OSX.

@akoeplinger akoeplinger merged commit 05cc60a into dotnet:main Apr 14, 2023
@akoeplinger akoeplinger deleted the fix-catalyst-build branch April 14, 2023 22:18
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants